package a;

import java.util.Arrays;
import java.util.Scanner;

public class yanghuisanjiao {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		int a;
		a=scanner.nextInt();
		int i,j;
		int [][]b=new int [a][a];	
			for( i=0;i<a;i++) {
				for( j=0;j<=i;j++) {
					if(j==i||j==0) {
						b[i][j]=1;
					}
					else {
						b[i][j]=b[i-1][j]+b[i-1][j-1];
					}
					System.out.print(b[i][j]+" ");
				}
				System.out.println();	
			}
			
	}
}
